package controllers

import (
	"goCommerce/services"

	"github.com/astaxie/beego"
)

type UserController struct {
	beego.Controller
}

func (c *UserController) List() {
	userList := services.NewUserService().List()
	c.Data["models"] = userList
	c.TplName = "List.tpl"
}

func (c *UserController) JsonList() {
	userList := services.NewUserService().List()
	c.Data["json"] = userList
	c.ServeJSON()
}
